#pragma once
#include "WareTypes.h"
#include "CVector3.h"
#include "CMatrix3.h"
#include "CMatrix4.h"

BEGIN_WARECOMMON

/// CTransform
class CTransform
{
public:
	///
	CTransform()
	{
		m_matRotate.MakeIdentity();

		m_Scale[0] = 1.0f;
		m_Scale[1] = 1.0f;
		m_Scale[2] = 1.0f;

	}

	~CTransform() {}

	///
	inline void GetTranslate( CVector3& vTranslate ) { vTranslate = m_Translate; }
	///
	inline void SetTranslate( CVector3& vTranslate ) { m_Translate = vTranslate; }
	///
	inline void GetScale( CVector3& vScale ) { vScale = m_Scale; }
	///
	inline void SetScale( CVector3& vScale ) { m_Scale = vScale; }
	///
	inline void	GetRotate( CMatrix3& matRotate ) { matRotate = m_matRotate; }
	///
	inline void SetRotate( CMatrix3& matRotate ) { m_matRotate = matRotate; }

	///
	void		GetMatrix4( CMatrix4& m );

	///
	CTransform& operator=( CTransform& trans );

private:
	CMatrix3 m_matRotate;
	CVector3 m_Translate;
	CVector3 m_Scale;
};

END_WARECOMMON